<%@ page language="java" contentType="text/html; charset=GB18030"
    pageEncoding="GB18030"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script src="javascripts/prototype.js" language="JavaScript" type="text/javascript"></script>
        <script src="javascripts/scriptaculous.js" language="JavaScript" type="text/javascript"></script>
        <link rel="stylesheet" type="text/css" media="screen" href="http://l.yimg.com/hr/1126/del-frontend-min.css">

        <script>
            
            function setBuildName(e){
                var keynum
                var cmd
                if(window.event) // IE
                {
                    keynum = e.keyCode
                }
                else if(e.which) // Netscape/Firefox/Opera
                {
                    keynum = e.which
                }
                if(keynum==13){
                    //alert($("command").getValue());

                    var text = $('buildname').getValue();
                    new Ajax.Updater("confirm","SetBuildName?build="+text,{method:'get'});
                    new Effect.Highlight('confirm');
                }
            }

            function parseCommand(e)
            {
                var keynum
                var cmd
                if(window.event) // IE
                {
                    keynum = e.keyCode
                }
                else if(e.which) // Netscape/Firefox/Opera
                {
                    keynum = e.which
                }
                if(keynum==13){
                    //alert($("command").getValue());

                    var text = $('command').getValue();
                    new Ajax.Updater("result","ParseCommand?cmd="+text,{method:'get'});
                    new Effect.Highlight('result');

                }
            }
        </script>
    </head>
    <body>
        <input id="buildname" type="text" value="build0" onkeydown="setBuildName(event)" />
        <br><div id="confirm"></div><br>
        Command:
        <input id="command" type="text" onkeydown="parseCommand(event)" />
        <div id="result"></div>
    </body>
</html>
